<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>菜单管理</title>
	<meta name="decorator" content="default"/>
	<style type="text/css">
		#inputForm{
			width:50%;
			margin:auto;
			margin-top:200px;
		}
		fieldset{
			display:inline-block;width:100%;
		} 
		.ui-field-contain .ui-controlgroup-label {
			width: 56%;
		}
		.ui-field-contain .ui-controlgroup-controls {
			width: 40%;
		}
	</style>
	<script type="text/javascript">
		global.loginPassword = "${fns:getLoginPw()}";
		$(document).ready(function() {
			$("#inputForm").validate({
				submitHandler: function(form){
					var selStatus = $("input[name=status]:checked").val();
					if ("${status}" == selStatus){
						showTip("状态未改变!");
					} else {
						var submit = function(){
			    			sendMessage(form, '', '');
			            }
			    		loginPasswordPopup(submit);
					}
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
	<tags:message content="${message}"/>
	<div class="icon-buttons">
		<input type="button" class="leave-clean-session" data-inline="true" data-icon="back" data-iconpos="notext" value="返回"/>
	</div>
	<form:form id="inputForm" action="${ctx}/sys/setting/setting" method="get" class="form-horizontal">
		<div data-role="fieldcontain">
			<fieldset data-role="controlgroup" data-type="horizontal" data-inline="true">
		        <legend>每次操作都需输入任务密码:</legend>
		        <input type="radio" name="status" id="statusYes" value="0" ${empty status || status == 0 ? 'checked' : ''}>
		        <label for="statusYes">&nbsp;是&nbsp;</label>
		        <input type="radio" name="status" id="statusNo" value="1" ${status == 1 ? 'checked' : ''}>
		        <label for="statusNo">&nbsp;否&nbsp;</label>
		    </fieldset>
	    </div>
	    <input  type="submit" value="确定修改"/>
	</form:form>
</body>
</html>
